package com.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mall/a/api")
public class MallAContoller {
    @GetMapping("/")
    public String index(HttpServletRequest request) {
        return "this is mall a " + request.getLocalAddr() + ":" + request.getLocalPort();
    }

    @RequestMapping("/test")
    public String test(HttpServletRequest request) {
        return "mall a test() " + request.getLocalAddr() + ":" + request.getLocalPort();
    }

    @GetMapping("/user")
    public String user(HttpServletRequest request) {
        return "mall a user() " + request.getLocalAddr() + ":" + request.getLocalPort();
    }
}
